﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.Infrastructure.Attr;
using WCS.Infrastructure.Dto.Request.Log;
using WCS.Infrastructure.Dto.Response;
using WCS.Infrastructure.Dto.Response.Common;
using WCS.Infrastructure.EFCore;

namespace WCS.Service.Interface
{
    [Provider]
    public interface ILogService
    {
        /// <summary>
        /// 写入错误日志
        /// </summary>
        /// <param name="errorLog"></param>
        Task WriteError(ErrorLog errorLog);

        /// <summary>
        /// 写入行为日志
        /// </summary>
        /// <param name="actionLog"></param>
        Task WriteAction(ActionLog actionLog);

        /// <summary>
        /// 新增错误日志
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> AddErrorLogAsync(ErrorLogRequestDto dto);

        /// <summary>
        /// 新增行为日志
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> AddActionLogAsync(ActionLogRequestDto dto);

        /// <summary>
        /// 获取登录日志
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetLoginLogsAsync(LogRequestDto dto);
        /// <summary>
        /// 获取错误日志
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetErrorLogsAsync(LogRequestDto dto);
        /// <summary>
        /// 获取行为日志
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetActionLogsAsync(LogRequestDto dto);
    }
}
